﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="TicketDetails.aspx.cs" Inherits="WebApp.RepairingTickets.TicketDetails" %>

<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<asp:Content ID="Content1" ContentPlaceHolderID="scriptCssContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="titlePlaceHolder" runat="server">
    <asp:literal id="pageTitle" runat="server"></asp:literal>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="menuPlaceHolder" runat="server">
    <one:TabStrip ID="tspTicketManagement" runat="server" selectedtabcssclass="Current">
        <one:Tab name="receivingTicket" NavigateUrl="~/ReceivingTicket/ReceivingTicketEdit.aspx" Text="<%$ Resources:Strings, ReceivingTicket%>"></one:Tab>
        <one:Tab Name="repairingTicket" NavigateUrl="~/RepairingTickets/RepairingTicketManagement.aspx" Text="<%$ Resources:Strings, RepairingTicket%>"></one:Tab>
        <one:Tab Name="checkWarranty" NavigateUrl="~/RepairingTickets/CheckWarrantyManagement.aspx" Text="<%$ Resources:Strings, CheckWarranty%>" AllowRoles="Administrators,WarrantyConfirmers"></one:Tab>
        <one:Tab Name="verifyRepairQuality" NavigateUrl="~/RepairingTickets/VerifyRepairQualityManagement.aspx" Text="<%$ Resources:Strings, VerifyRepairQuality%>" AllowRoles="Administrators,RepairQualityConfirmers"></one:Tab>
        <one:Tab Name="searchRepairInfomation" NavigateUrl="~/ReceivingTicket/ReceivingTicketManagement.aspx" Text="<%$ Resources:Strings, SearchRepairInfomation%>"></one:Tab>
    </one:TabStrip>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="contentPlaceHolder" runat="server">
    <table style="width:100%; border:0px;">
        <tr>
            <td colspan="4" style="text-align:center;"><h3>THÔNG TIN CHI TIẾT SỬA CHỮA</h3></td>
        </tr>
    </table>

    <fieldset title="Thông tin khách hàng">
        <legend>Thông tin khách hàng</legend>
        <table style="width:100%; border:0px;">
            <tr>
                <td class="ISoft_LabelTitle" style="width:20%;">Họ tên: </td>
                <td class="ISoft_Input" style="width:30%;">
                    <asp:Label runat="server" ID="lblFullName"></asp:Label>
                </td>

                <td class="ISoft_LabelTitle" style="width:20%;">Số điện thoại: </td>
                <td class="ISoft_Input" style="width:30%;">
                    <asp:Label runat="server" ID="lblMobile"></asp:Label>
                </td>
            </tr>

            <tr>
                <td class="ISoft_LabelTitle">Địa chỉ: </td>
                <td class="ISoft_Input" colspan="3">
                    <asp:Label runat="server" ID="lblAddress"></asp:Label>
                </td>
            </tr>
        </table>
    </fieldset>

    <fieldset title="Thông tin sản phẩm">
        <legend>Thông tin sản phẩm</legend>
        <table style="width:100%; border:1px;">
            <tr>
                <td class="ISoft_LabelTitle" style="width:20%;">Loại sản phẩm: </td>
                <td class="ISoft_Input" style="width:30%;">
                    <asp:Label runat="server" ID="lblProductTypeName"></asp:Label>
                </td>

                <td class="ISoft_LabelTitle" style="width:20%;">Hãng sản xuất: </td>
                <td class="ISoft_Input" style="width:30%;">
                    <asp:Label runat="server" ID="lblManufacturer"></asp:Label>
                </td>
            </tr>

            <tr>
                <td class="ISoft_LabelTitle">Số model: </td>
                <td class="ISoft_Input">
                    <asp:Label runat="server" ID="lblModel"></asp:Label>
                </td>

                <td class="ISoft_LabelTitle">Số serial: </td>
                <td class="ISoft_Input">
                    <asp:Label runat="server" ID="lblSerialNumber"></asp:Label>
                </td>
            </tr>

            <tr>
                <td class="ISoft_LabelTitle">Thông tin hư hỏng: </td>
                <td class="ISoft_Input" colspan="3">
                    <asp:Label runat="server" ID="lblProductDescription"></asp:Label>
                </td>
            </tr>

            <tr>
                <td class="ISoft_LabelTitle">Ghi chú: </td>
                <td class="ISoft_Input" colspan="3">
                    <asp:Label runat="server" ID="lblNote"></asp:Label>
                </td>
            </tr>

        </table>
    </fieldset>

    <fieldset title="Quá trình sửa chữa">
        <legend>Quá trình sửa chữa</legend>
        <table style="width:100%; border:0px;">
            <tr>
                <td>
                    <telerik:RadGrid ID="grdResult" runat="server" AllowPaging="true" AllowSorting="true"
                                    EnableEmbeddedSkins="true" 
                        Skin="<%$ Resources:Strings, Skin%>" 
                        onitemcreated="grdResult_ItemCreated" 
                        onneeddatasource="grdResult_NeedDataSource"  
                        onitemdatabound="grdResult_ItemDataBound">
                        <HeaderStyle Wrap="true" Font-Bold="true" HorizontalAlign="Center" Font-Size="10pt" />
                        <AlternatingItemStyle Font-Names="arial,tahoma,sans-serif" Font-Size="12px" BorderStyle="Solid"/>                
                        <ItemStyle Font-Names="arial,tahoma,sans-serif" Font-Size="12px" BorderColor="#2299DD"/>
                    
                        <PagerStyle  HorizontalAlign="Right" Mode="NextPrevNumericAndAdvanced"
                                    PagerTextFormat="Chọn trang: {4} &amp;nbsp;|&amp;nbsp; Trang hiện tại: {0} / {1}, mẫu tin: {2} - {3} / {5}." AlwaysVisible="True"/>
                    
                        <MasterTableView AutoGenerateColumns="false" NoMasterRecordsText="<%$ Resources:Strings, NoMasterRecordsText%>">
            
                            <Columns>
                                <telerik:GridTemplateColumn HeaderText="STT">
                                    <HeaderStyle Width="30px" />
                                    <ItemStyle HorizontalAlign="Center" />
                                    <ItemTemplate>
                                        <asp:Label style="text-align:center" id="lblSTT" runat="server" Text='<%# grdResult.CurrentPageIndex*grdResult.PageSize + grdResult.Items.Count+1 %>' />
                                    </ItemTemplate>
                                </telerik:GridTemplateColumn>
                
                                <telerik:GridBoundColumn DataField="RepairingTicketHistoryID" UniqueName="RepairingTicketHistoryID" Visible="false">
                                </telerik:GridBoundColumn>
            
                                <telerik:GridBoundColumn HeaderText="Tình Trạng" DataField="StatusName" UniqueName="StatusName" SortExpression="StatusName">
                                    <ItemStyle HorizontalAlign="Left" Width="10%"/>
                                </telerik:GridBoundColumn>

                                <telerik:GridBoundColumn HeaderText="Ngày Nhận/Ngày Sửa" DataField="CreatedDate" UniqueName="CreatedDate" SortExpression="CreatedDate">
                                    <ItemStyle HorizontalAlign="Left" Width="10%"/>
                                </telerik:GridBoundColumn>
                
                                <telerik:GridBoundColumn HeaderText="Người Nhận/Người Sửa" DataField="Repairer" UniqueName="Repairer" SortExpression="Repairer">
                                    <ItemStyle HorizontalAlign="Left" Width="15%"/>
                                </telerik:GridBoundColumn>

                                <telerik:GridBoundColumn HeaderText="Loại Sửa Chữa" DataField="RepairingTypeName" UniqueName="RepairingTypeName" SortExpression="RepairingTypeName">
                                    <ItemStyle HorizontalAlign="Left" Width="10%"/>
                                </telerik:GridBoundColumn>

                                <telerik:GridBoundColumn HeaderText="Lý Do Sửa Chưa Xong/Nội Dung Sửa Chữa" DataField="Description" UniqueName="Description" SortExpression="Description">
                                    <ItemStyle HorizontalAlign="Left" Width="20%"/>
                                </telerik:GridBoundColumn>

                                <telerik:GridBoundColumn HeaderText="Ghi Chú" DataField="Note" UniqueName="Note" SortExpression="Note">
                                    <ItemStyle HorizontalAlign="Left" Width="20%"/>
                                </telerik:GridBoundColumn>

                                <telerik:GridBoundColumn HeaderText="Tiền Khách Hàng Trả" DataField="Cost" UniqueName="Cost" SortExpression="Cost">
                                    <ItemStyle HorizontalAlign="Left" Width="10%"/>
                                </telerik:GridBoundColumn>
            
                            </Columns>
                        </MasterTableView>
                    </telerik:RadGrid>
                </td>
            </tr>
        </table>
    </fieldset>

    <fieldset title="Thông tin xác nhận bảo hành & chất lượng sửa chữa">
        <legend>Thông tin xác nhận bảo hành & chất lượng sửa chữa</legend>
        <table style="width:100%; border:0px;">
            <tr>
                <td class="ISoft_LabelTitle" style="width:20%;">Ngày xác nhận bảo hành: </td>
                <td class="ISoft_Input" style="width:30%;">
                    <asp:Label runat="server" ID="lblWarrantyConfirmDate"></asp:Label>
                </td>

                <td class="ISoft_LabelTitle" style="width:20%;">Người xác nhận bảo hành: </td>
                <td class="ISoft_Input" style="width:30%;">
                    <asp:Label runat="server" ID="lblWarrantyConfirmer"></asp:Label>
                </td>
            </tr>

            <tr>
                <td class="ISoft_LabelTitle">Tình trạng bảo hành: </td>
                <td class="ISoft_Input">
                    <asp:Label runat="server" ID="lblIsValidWarranty"></asp:Label>
                </td>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
            </tr>

            <tr>
                <td class="ISoft_LabelTitle">Ngày xác nhận chất lượng sửa: </td>
                <td class="ISoft_Input">
                    <asp:Label runat="server" ID="lblRepairQualityConfirmDate"></asp:Label>
                </td>
                <td class="ISoft_LabelTitle">Người xác nhận chất lượng sửa: </td>
                <td class="ISoft_Input">
                    <asp:Label runat="server" ID="lblRepairQualityConfirmer"></asp:Label>
                </td>
            </tr>

            <tr>
                <td class="ISoft_LabelTitle">Chất lượng sửa: </td>
                <td class="ISoft_Input">
                    <asp:Label runat="server" ID="lblRepairQualityName"></asp:Label>
                </td>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
            </tr>

            <tr>
                <td class="ISoft_LabelTitle">Ghi chú chất lượng sửa: </td>
                <td class="ISoft_Input" colspan="3">
                    <asp:Label runat="server" ID="lblRepairQualityNote"></asp:Label>
                </td>
            </tr>

        </table>
    </fieldset>

    <table style="width:100%; border:0px;">
        <tr>
            <td class="ISoft_ButtonsRow">
                <telerik:RadButton ID="btnBack" runat="server" 
                    Skin="<%$ Resources:Strings, Skin%>" Text="<%$ Resources:Strings, Back%>" 
                    Width="100px" onclick="btnBack_Click"></telerik:RadButton>
            </td>
        </tr>
    </table>
</asp:Content>
